package com.wanwen.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;

public class Users {
	@TableId(type=IdType.AUTO)
	private Integer id;//编号
	@TableField(value = "uname")
	private String uname;//用户名称
	private String password;//密码
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss")  
	@TableField(value = "create_time")
	private Date createTime;//创建时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss")  
	@TableField(value = "last_login_time")
	private Date lastLoginTime;//最后登录时间
	@TableField(value = "is_lock")
	private Integer isLock;//是否锁定
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss")  
	@TableField(value = "lock_time")
	private Date lockTime;//锁定时间
	@TableField(value = "wrong_num")
	private Integer wrongNum;//错误次数
	private Integer weight;//权重
	private String phone;//电话
	private String email;//邮箱
	@TableField(value = "is_signin")
	private Integer isSignin;//是否签到
	@TableField(value = "is_allot")
	private Integer isAllot;//是否分配
	@TableLogic(value = "0", delval = "-1")
	private Integer deleted;
	public Users(Integer id, String uname, String password, Date createTime, Date lastLoginTime, Integer isLock,
			Date lockTime, Integer wrongNum, Integer weight, String phone, String email, Integer isSignin,
			Integer isAllot, Integer deleted) {
		super();
		this.id = id;
		this.uname = uname;
		this.password = password;
		this.createTime = createTime;
		this.lastLoginTime = lastLoginTime;
		this.isLock = isLock;
		this.lockTime = lockTime;
		this.wrongNum = wrongNum;
		this.weight = weight;
		this.phone = phone;
		this.email = email;
		this.isSignin = isSignin;
		this.isAllot = isAllot;
		this.deleted = deleted;
	}
	public Users() {
		super();
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public Integer getIsLock() {
		return isLock;
	}
	public void setIsLock(Integer isLock) {
		this.isLock = isLock;
	}
	public Date getLockTime() {
		return lockTime;
	}
	public void setLockTime(Date lockTime) {
		this.lockTime = lockTime;
	}
	public Integer getWrongNum() {
		return wrongNum;
	}
	public void setWrongNum(Integer wrongNum) {
		this.wrongNum = wrongNum;
	}
	public Integer getWeight() {
		return weight;
	}
	public void setWeight(Integer weight) {
		this.weight = weight;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Integer getIsSignin() {
		return isSignin;
	}
	public void setIsSignin(Integer isSignin) {
		this.isSignin = isSignin;
	}
	public Integer getIsAllot() {
		return isAllot;
	}
	public void setIsAllot(Integer isAllot) {
		this.isAllot = isAllot;
	}
	public Integer getDeleted() {
		return deleted;
	}
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	@Override
	public String toString() {
		return "Users [id=" + id + ", uname=" + uname + ", password=" + password + ", createTime=" + createTime
				+ ", lastLoginTime=" + lastLoginTime + ", isLock=" + isLock + ", lockTime=" + lockTime + ", wrongNum="
				+ wrongNum + ", weight=" + weight + ", phone=" + phone + ", email=" + email + ", isSignin=" + isSignin
				+ ", isAllot=" + isAllot + ", deleted=" + deleted + "]";
	}
	
	
}
